﻿@model IEnumerable<ContentComment>


<h4>相关回复(@Model.Count())</h4>
<hr>
@if (!Model.Any())
{
    <div class="text-center mt-3">暂无任何数据</div>
}
else
{
    <ul class="list-unstyled">

        @foreach (var item in Model)
        {
        <li class="media mt-3 border-bottom p-2 rounded" id="comment-@item.Id">
            <a asp-page="/user/index" asp-route-userId="@item.Author.Id">
                <img class="mr-3 rounded img-avatar-100" src="@item.Author.AvatarUrl" alt="@item.Author.UserName">
                <p class="text-center">@item.Author.UserName</p>
            </a>
            <div class="media-body">
                @Html.Partial("/Pages/Shared/_MarkdownBody.cshtml",new MarkdownBodyViewModel {  Id=$"comment-{item.Id}", Body=item.Body})
                <hr />
                <ul class="list-inline text-muted text-sm pull-right">
                    <li class="list-inline-item"><i class="far fa-clock"></i> @item.PostedTime.ToHumanDateTimeString()</li>
                </ul>
            </div>
        </li>
        }
    </ul>
}